package org.resotc.model;

import java.util.ArrayList;
import java.util.HashMap;

public interface Intersection extends Element {
	
	/**
	 * Returns current phase system.
	 * @return
	 */
	public Phasen getCurrentPhase();

	/**
	 * Returns  the phase system.
	 * 
	 * @return
	 */
	public HashMap<Phasen, Integer> getPhaseSystem();
	/**
	 * Set the the phase system.
	 * 
	 * @return
	 */
	public  void setPhaseSystem(HashMap<Phasen, Integer> phasensystem);
	/**
	 * Returns true or false whether turning left is allowed or not.
	 * 
	 * @return
	 */
	public boolean isQueueLeft();

	/**
	 * Adds an arriving individual to the intersection system.
	 * 
	 * @param ind
	 * @param trackId
	 */
	public void addArrivingIndividual(Individual ind, int trackId);

	/**
	 * Returns the number of individuals which the intersection is containing.
	 * 
	 * @return
	 */
	public int getNumberOfIndividuals();

	/**
	 * Returns the queues dedicated to the intersection.
	 * 
	 * @return
	 */
	public ArrayList<Queue> getQueues();

	/**
	 * Separates the queues dedicated to the intersections from the other queues
	 * and stores them to a HashMap.
	 * 
	 * @param queues
	 */
	public void initializeQueues(HashMap<Integer, Queue> queues);

	//
	// public int getPhaseSystem();
	//
	// /**
	// * Defines if there is a left queue or not.
	// * @return
	// */
	// public boolean isQueueLeft();
	//
	// public ArrayList<Element>
	// determineAccessibleNeighbours(NeighbourOrientation o);
	//
	// public void initialiseQueuesForNeighbour(NeighbourOrientation or);
	//
	// /**
	// * Generates queues for approaching vehicles.
	// * @param or
	// */
	// public void generateQueues(NeighbourOrientation or);
	//
	// /**
	// * Initializes a queue for each queue in one direction for new arrivals.
	// * @param or
	// */
	// public void initializeQueueForArrivals(NeighbourOrientation or);
	//
	// public HashMap<NeighbourOrientation, Queue> getQueues();
	//
	// /**
	// * Appends queues on outgoing tracks.
	// * @param or
	// */
	// public void intializeOutgoingQueues(NeighbourOrientation or);
	//
	// /**
	// * Returns the new arrivals.
	// * @return
	// */
	// public HashMap<NeighbourOrientation, LinkedList<Individual>>
	// getNewArrivals();
	//
	// /**
	// * Adds a new individual.
	// */
	// public void addArrivingIndividual(Individual newInd, NeighbourOrientation
	// or);
	//
	// /**
	// * Returns the neighbours of the intersection.
	// * @return
	// */
	// public HashMap<NeighbourOrientation, Element> getNeighbours();
	//
	// /**
	// * Returns all destination of the intersection.
	// * @return
	// */
	// public HashMap<NeighbourOrientation, Element> getDestinations();
	//
	// public void initializeQueuesForNeighbour1(NeighbourOrientation or);
	//
	// public void initializeApproachingQueues(NeighbourOrientation or);
	//
	// public void initializeQueues();
	//
	// public HashMap<Street, Queue> getOutgoingQueues();
	//
	// public HashMap<Street, Queue> getApproachingQueues();

}
